x86/HVM: consolidate passthrough handling in epte_get_entry_emt()
authorJan Beulich <jbeulich@suse.com>
Mon, 10 Mar 2014 10:04:36 +0000 (11:04 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 10 Mar 2014 10:04:36 +0000 (11:04 +0100)
commit3089a6d82bdf3112ccb1dd074ce34a8cbdc4ccd8
tree53265ba3845974fe110508bfe6b3f5dc09f72099
parentb99113b9d5fac5149de8496f55afa00e285b1ff3
x86/HVM: consolidate passthrough handling in epte_get_entry_emt()

It is inconsistent to depend on iommu_enabled alone: For a guest
without devices passed through to it, it is of no concern whether the
IOMMU is enabled.

There's one rather special case to take care of: VMX code marks the
LAPIC access page as MMIO. The added assertion needs to take this into
consideration, and the subsequent handling of the direct MMIO case was
inconsistent too: That page would have been WB in the absence of an
IOMMU, but UC in the presence of it, while in fact the cachabilty of
this page is entirely unrelated to an IOMMU being in use.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: "Xu, Dongxiao" <dongxiao.xu@intel.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/hvm/mtrr.c
xen/arch/x86/hvm/vmx/vmx.c